How to Get an Efficient yet Verified Arbitrary-Precision Integer Library
نویسندگان
چکیده
The GNU Multi-Precision library is a widely used, safetycritical, library for arbitrary-precision arithmetic. Its source code is written in C and assembly, and includes intricate state-of-the-art algorithms for the sake of high performance. Formally verifying the functional behavior of such highly optimized code, not designed with verification in mind, is challenging. We present a fully verified library designed using the Why3 program verifier. The use of a dedicated memory model makes it possible to have the Why3 code be very similar to the original GMP code. This library is extracted to C and is compatible and performancecompetitive with GMP.
منابع مشابه
Bound Analysis for Whiley Programs
The Whiley compiler can generate naive C code, but the code is inefficient because it uses infinite integers and dynamic array sizes. Our project goal is to build up a compiler that can translate Whiley programs into efficient OpenCL code with fixed-size integer types and fixed-size arrays, for parallel execution on GPUs. This paper presents an abstract interpretation-based bound inference appr...
متن کاملImporting the Gnu Multiple Precision Package (GMP) into Lisp, and implications for Functional Programming
Advocating the use of a Common Lisp as a central organizing environment for building scientific computing systems runs counter to the conventional wisdom, which suggests that languages like Fortran, C++, or even Java, are more suitable. We prefer Lisp based on its debugging features, interactivity, memory model, existing code-base for computer algebra and user interfaces, and for purposes of th...
متن کاملArbitrary-length Fast Hartley Transform without Multiplications
Discrete Hartley transform (DHT) is an important tool in digital signal processing. In this paper, a multilierless algorithm to compute discrete Hartley transforms is proposed, which can deal with arbitrary length input signals. The proposed algorithm can be implemented by integer additions of fixed points in binary system. Besides, an efficient and regular systolic array is designed to impleme...
متن کاملMultiple Precision Integer Multiplication on GPUs
This paper addresses multiple precision integer multiplication on GPUs. In this paper, we propose a novel data-structure named a product digit table and present a GPU algorithm to perform the multiplication with the product digit table. Experimental results on a 3.10 GHz Intel Core i3-2100 CPU and an NVIDIA GeForce GTX480 GPU show that the proposed GPU algorithm respectively runs over 71.4 time...
متن کاملAn Experimental Analysis of Floating-Point Versus Exact Arithmetic
In this paper we investigate how sophisticated floatingpoint codes that are in real-world use – VRONI for computing Voronoi diagrams, FIST for computing triangulations, and BONE for computing straight skeletons – can benefit from the use of the Core library (for exact geometric computing) or the MPFR library (for multiprecision arithmetic). We also discuss which changes to the codes were necess...
متن کامل